package com.jt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jt.pojo.Item;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ItemMapper extends BaseMapper<Item> {
    //分页
    @Select("select * from tb_item  order by updated desc limit #{startIndex},#{rows}")
    List<Item> findItemByPage(int startIndex, int rows);
    //商品删除
    int deleteItem(Long[] ids);
    //商品上下架
    void updateStatus(@Param("ids") Long[] ids, @Param("status") Integer status);
}
